package org.lisz.order.feign;

import org.lisz.order.feign.impl.ProductFallBackFeign;
import org.lisz.product.po.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "product-service",fallback = ProductFallBackFeign.class)
public interface ProductFeignClient {

    @GetMapping("/product/{id}")
    Product getProducts(@PathVariable("id") Long id);
}
